package com.zmn.plat.services.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.zmn.plat.business.impl.expressage.KuaiDi100ServiceImpl;

/**
 * 快递100
 *
 * @author quanjic
 * @version v1.0
 * @since 2018/11/26 21:11
 **/
@Configuration
@ConfigurationProperties(prefix = "kuaidi100")
public class KuaiDi100Config {

    /**
     * 授权码
     */
    private String key;

    private String url = "https://poll.kuaidi100.com";

    /**
     * 单号归属公司查询
     */
    private String autoNumberUrl = "http://www.kuaidi100.com/autonumber/auto";

    /**
     * 订阅回调URL
     */
    private String callbackUrl;

    /**
     * 快递100分配的公司编号
     */
    private String customer;

    @Bean
    public KuaiDi100ServiceImpl kuaiDi100Service() {
        KuaiDi100ServiceImpl kuaiDi100Service = new KuaiDi100ServiceImpl();
        kuaiDi100Service.setConfig(this);
        return kuaiDi100Service;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getCallbackUrl() {
        return callbackUrl;
    }

    public void setCallbackUrl(String callbackUrl) {
        this.callbackUrl = callbackUrl;
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    public String getAutoNumberUrl() {
        return autoNumberUrl;
    }

    public void setAutoNumberUrl(String autoNumberUrl) {
        this.autoNumberUrl = autoNumberUrl;
    }
}
